﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for CarColor
/// </summary>


public class ParkingFloor
{
    #region Properties
    public Guid ID { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public Employee LastUser { get; set; }
    public DateTime LastUpdate { get; set; }
    #endregion
    public ParkingFloor()
    {
        //
        // TODO: Add constructor logic here
        //
        this.ID = Guid.Empty;
        this.Name = String.Empty;
        this.Description = String.Empty;
        this.LastUser = null;
        this.LastUpdate = DateTime.Now;
    }

    public IList<ParkingFloor> GetAll()
    {
        return ParkingFloorDAL.GetAll();
    }

    public string GetName
    {
        get
        {
            return ParkingFloorDAL.GetName(this.ID);
        }
        
    }

    public ParkingFloor GetById(Guid guid)
    {
        return ParkingFloorDAL.GetById(guid);
    }

    public bool InsertOrUpdate(ParkingFloor parking)
    {
        return ParkingFloorDAL.InsertOrUpdate(parking);
    }

    public bool IsExistFloor(string p)
    {
        return ParkingFloorDAL.IsExistCardType(p);
    }

    public bool Delete(Guid guid)
    {
        return ParkingFloorDAL.Delete(guid);
    }
}